package com.yumingjaing.functioninterface;

/**
 * @description:
 * @author: John
 * @version: TestFunction.java, v1.0 2024年11月16日 23:25
 */
public class TestFunction {
    public static void main(String[] args) {
        execute("张三", new UserQueryInterface() {
            @Override
            public int queryUserAgeByName(String name) {
                return 0;
            }
        });

        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("---");
            }
        });
    }

    private static void execute(String uname,UserQueryInterface userQueryInterface){
        System.out.println(userQueryInterface.queryUserAgeByName(uname));
    }
}